home *** CD-ROM | disk | FTP | other *** search
/ The Games Machine 76 / XENIATGM66.iso / Indiana Jones / Indiana Jones.exe / RESOURCE / PREVIEW.GOB / cog_gen_whipcam.cog < prev    next >
Text File  |  1999-11-15  |  2KB  |  99 lines

  1. # Jones 3D Cog Script
  2. #
  3. # gen_whip cam.cog
  4. #
  5. # Generic whip swing camera offset Script
  6. #
  7. # [CMG]
  8. #
  9. # (C) 1997 LucasArts Entertainment Co. All Rights Reserved
  10. # ========================================================================================
  11.  
  12. symbols
  13.     
  14.  
  15.     #..................MESSAGES................
  16.     message        damaged        
  17.     message        startup        
  18.  
  19.     
  20.     #..................ACTORS................
  21.     thing        player                                  local
  22.     
  23.  
  24.     #..................CAMERAS................
  25.     thing       swingCam                  
  26.     
  27.     #..................PROPS................
  28.     thing        whipstrut
  29.  
  30.     #..................SOUNDS................
  31.     sound       sndFalling=gen_fallingrock_c.wav        local
  32.     sound       music=mus_gen_indywhip1.wav                local
  33.  
  34.             
  35.     #..................VARIABLES................
  36.     int            curCam                                    local
  37.     int            solidCHEN=0                                local
  38.     
  39.     
  40. end
  41.  
  42. # ========================================================================================
  43. code
  44.  
  45. startup:
  46.  
  47.     player=GetLocalPlayerThing();
  48.  
  49. return;
  50. # ========================================================================================
  51.  
  52. damaged:
  53.  
  54. if ((GetSenderRef() == whipstrut) && (GetParam(1) == 0x10))
  55.     {
  56.         # Indy whips across the gap...
  57.         
  58.         # Prep...
  59.         StartCutScene(1);
  60.         SetActorFlags(player, 0x200000);
  61.         #curCam = GetCurrentCamera();
  62.         SetCameraPosInterp(2, 0); # kill dolly
  63.         SetCameraLookInterp(2, 0); # kill pan & tilt
  64.         Sleep(1.0);
  65.         
  66.         # move cam to known position with a wide angle
  67.         #SetExtCamOffsetToThing(swingCam);
  68.         SetCameraFocus(2, swingCam);
  69.         SetCameraSecondaryFocus(2, player);
  70.         SetcurrentCamera(2);
  71.         SetCameraFOV(100, 1, 1.0);
  72.         Sleep(1.0);
  73.  
  74.         # play music if it hasn't played already
  75.         If (solidCHEN == 0)
  76.             {
  77.             PlaySoundLocal(music, 1.0, 0.0, 0x0, 0);
  78.             solidCHEN = 1;
  79.             }
  80.  
  81.         # sound and object creation for collapsing whip strut
  82.         PlaySoundLocal(sndFalling, 1.0, 0.0, 0x0, 0);
  83.  
  84.         Sleep(0.5);
  85.         SetCameraFOV(90, 0, 0.0);
  86.         SetCameraPosition(1, GetThingPos(swingCam));
  87.         SetCurrentCamera(1);
  88.         #RestoreExtCam();
  89.         SetCameraFOV(90, 1, 0.25);
  90.         Sleep(2.0);
  91.         ClearActorFlags(player, 0x200000);
  92.         EndCutScene();
  93.     }
  94. return;
  95. # ========================================================================================
  96.     
  97. end
  98.  
  99.